package com.example.testspringboot.conf;

import io.micrometer.core.instrument.MeterRegistry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import io.micrometer.core.instrument.Counter;

import javax.annotation.Resource;

@Component
@Configuration
public class TestConfig {
    @Resource
    private MeterRegistry registry;

    @Bean
    public Counter counter1(){
        return Counter.builder("test.count1").register(registry);
    }
}
